home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / mousebls / form1.frm (.txt) next >
Encoding:
Visual Basic Form  |  1998-05-23  |  12.9 KB  |  355 lines

  1. VERSION 5.00
  2. Object = "{2CDFC64D-E662-11D1-AB7E-9375ABA736FF}#1.0#0"; "MOUSEBLAST.OCX"
  3. Begin VB.Form Form1 
  4.    Caption         =   "Visual Enterprises Mouse Blaster Ver 1.0"
  5.    ClientHeight    =   3180
  6.    ClientLeft      =   60
  7.    ClientTop       =   345
  8.    ClientWidth     =   4680
  9.    Icon            =   "form1.frx":0000
  10.    LinkTopic       =   "Form1"
  11.    LockControls    =   -1  'True
  12.    ScaleHeight     =   3180
  13.    ScaleWidth      =   4680
  14.    StartUpPosition =   3  'Windows Default
  15.    Begin MouseBLST.MouseBlast MouseBlast1 
  16.       Left            =   2175
  17.       Top             =   2685
  18.       _ExtentX        =   2408
  19.       _ExtentY        =   847
  20.    End
  21.    Begin VB.PictureBox Picture2 
  22.       BackColor       =   &H00808000&
  23.       Height          =   2040
  24.       Left            =   75
  25.       ScaleHeight     =   1980
  26.       ScaleWidth      =   4470
  27.       TabIndex        =   4
  28.       Top             =   600
  29.       Width           =   4530
  30.       Begin VB.Label lblMsgFilVal 
  31.          Appearance      =   0  'Flat
  32.          BackColor       =   &H80000005&
  33.          BorderStyle     =   1  'Fixed Single
  34.          ForeColor       =   &H80000008&
  35.          Height          =   225
  36.          Left            =   3720
  37.          TabIndex        =   19
  38.          Top             =   750
  39.          Width           =   510
  40.       End
  41.       Begin VB.Label Label1 
  42.          BackColor       =   &H00808000&
  43.          Caption         =   "Window Handle"
  44.          ForeColor       =   &H00FFFFFF&
  45.          Height          =   195
  46.          Left            =   60
  47.          TabIndex        =   17
  48.          Top             =   15
  49.          Width           =   1200
  50.       End
  51.       Begin VB.Label lblWhwnd 
  52.          Appearance      =   0  'Flat
  53.          BackColor       =   &H80000005&
  54.          BorderStyle     =   1  'Fixed Single
  55.          Caption         =   "0"
  56.          ForeColor       =   &H80000008&
  57.          Height          =   210
  58.          Left            =   1335
  59.          TabIndex        =   16
  60.          Top             =   30
  61.          Width           =   1260
  62.       End
  63.       Begin VB.Label Label2 
  64.          BackColor       =   &H00808000&
  65.          Caption         =   "Message Found"
  66.          ForeColor       =   &H00FFFFFF&
  67.          Height          =   225
  68.          Left            =   30
  69.          TabIndex        =   15
  70.          Top             =   375
  71.          Width           =   1260
  72.       End
  73.       Begin VB.Label lblMsgFound 
  74.          Appearance      =   0  'Flat
  75.          BackColor       =   &H80000005&
  76.          BorderStyle     =   1  'Fixed Single
  77.          Caption         =   "No Message Found"
  78.          ForeColor       =   &H80000008&
  79.          Height          =   255
  80.          Left            =   1320
  81.          TabIndex        =   14
  82.          Top             =   375
  83.          Width           =   1950
  84.       End
  85.       Begin VB.Label Label3 
  86.          BackColor       =   &H00808000&
  87.          Caption         =   "Message Filter"
  88.          ForeColor       =   &H00FFFFFF&
  89.          Height          =   255
  90.          Left            =   45
  91.          TabIndex        =   13
  92.          Top             =   750
  93.          Width           =   1140
  94.       End
  95.       Begin VB.Label lblFilter 
  96.          Appearance      =   0  'Flat
  97.          BackColor       =   &H80000005&
  98.          BorderStyle     =   1  'Fixed Single
  99.          ForeColor       =   &H80000008&
  100.          Height          =   225
  101.          Left            =   1335
  102.          TabIndex        =   12
  103.          Top             =   750
  104.          Width           =   2325
  105.       End
  106.       Begin VB.Label Label4 
  107.          BackColor       =   &H00808000&
  108.          Caption         =   "Double Click Speed ms"
  109.          ForeColor       =   &H00FFFFFF&
  110.          Height          =   195
  111.          Left            =   45
  112.          TabIndex        =   11
  113.          Top             =   1110
  114.          Width           =   1755
  115.       End
  116.       Begin VB.Label lblDblClick 
  117.          Appearance      =   0  'Flat
  118.          BackColor       =   &H80000005&
  119.          BorderStyle     =   1  'Fixed Single
  120.          Caption         =   "500"
  121.          ForeColor       =   &H80000008&
  122.          Height          =   210
  123.          Left            =   1800
  124.          TabIndex        =   10
  125.          Top             =   1095
  126.          Width           =   1125
  127.       End
  128.       Begin VB.Label Label5 
  129.          BackColor       =   &H00808000&
  130.          Caption         =   "Message Action"
  131.          ForeColor       =   &H00FFFFFF&
  132.          Height          =   240
  133.          Left            =   45
  134.          TabIndex        =   9
  135.          Top             =   1455
  136.          Width           =   1245
  137.       End
  138.       Begin VB.Label lblAction 
  139.          Appearance      =   0  'Flat
  140.          BackColor       =   &H80000005&
  141.          BorderStyle     =   1  'Fixed Single
  142.          ForeColor       =   &H80000008&
  143.          Height          =   210
  144.          Left            =   1320
  145.          TabIndex        =   8
  146.          Top             =   1470
  147.          Width           =   285
  148.       End
  149.       Begin VB.Label Label7 
  150.          BackColor       =   &H00808000&
  151.          Caption         =   "HEX"
  152.          ForeColor       =   &H00FFFFFF&
  153.          Height          =   210
  154.          Left            =   2670
  155.          TabIndex        =   7
  156.          Top             =   15
  157.          Width           =   405
  158.       End
  159.       Begin VB.Label lblHwndHex 
  160.          Appearance      =   0  'Flat
  161.          BackColor       =   &H80000005&
  162.          BorderStyle     =   1  'Fixed Single
  163.          ForeColor       =   &H80000008&
  164.          Height          =   210
  165.          Left            =   3135
  166.          TabIndex        =   6
  167.          Top             =   30
  168.          Width           =   1320
  169.       End
  170.       Begin VB.Label lblMsgActCap 
  171.          Appearance      =   0  'Flat
  172.          BackColor       =   &H80000005&
  173.          BorderStyle     =   1  'Fixed Single
  174.          ForeColor       =   &H80000008&
  175.          Height          =   210
  176.          Left            =   1680
  177.          TabIndex        =   5
  178.          Top             =   1470
  179.          Width           =   1710
  180.       End
  181.    End
  182.    Begin VB.PictureBox Picture1 
  183.       BackColor       =   &H00808000&
  184.       FillColor       =   &H00404000&
  185.       FillStyle       =   0  'Solid
  186.       Height          =   495
  187.       Left            =   810
  188.       ScaleHeight     =   435
  189.       ScaleWidth      =   3720
  190.       TabIndex        =   1
  191.       Top             =   0
  192.       Width           =   3780
  193.       Begin VB.Label Label8 
  194.          BackColor       =   &H00808000&
  195.          BackStyle       =   0  'Transparent
  196.          Caption         =   "Visual Enterprises"
  197.          BeginProperty Font 
  198.             Name            =   "Arial"
  199.             Size            =   15.75
  200.             Charset         =   0
  201.             Weight          =   700
  202.             Underline       =   0   'False
  203.             Italic          =   0   'False
  204.             Strikethrough   =   0   'False
  205.          EndProperty
  206.          ForeColor       =   &H0000FFFF&
  207.          Height          =   360
  208.          Index           =   1
  209.          Left            =   240
  210.          TabIndex        =   3
  211.          Top             =   15
  212.          Width           =   2850
  213.       End
  214.       Begin VB.Label Label8 
  215.          BackColor       =   &H00808000&
  216.          Caption         =   "Visual Enterprises"
  217.          BeginProperty Font 
  218.             Name            =   "Arial"
  219.             Size            =   15.75
  220.             Charset         =   0
  221.             Weight          =   700
  222.             Underline       =   0   'False
  223.             Italic          =   0   'False
  224.             Strikethrough   =   0   'False
  225.          EndProperty
  226.          ForeColor       =   &H00000000&
  227.          Height          =   360
  228.          Index           =   0
  229.          Left            =   285
  230.          TabIndex        =   2
  231.          Top             =   15
  232.          Width           =   2850
  233.       End
  234.    End
  235.    Begin VB.CommandButton CmdExit 
  236.       Caption         =   "Exit"
  237.       Height          =   300
  238.       Left            =   3720
  239.       TabIndex        =   0
  240.       Top             =   2775
  241.       Width           =   825
  242.    End
  243.    Begin VB.Label Label6 
  244.       BackColor       =   &H0000FFFF&
  245.       Caption         =   "TEST ON GREY AREA"
  246.       Height          =   210
  247.       Left            =   195
  248.       TabIndex        =   18
  249.       Top             =   2745
  250.       Width           =   1815
  251.    End
  252.    Begin VB.Image Image1 
  253.       Height          =   690
  254.       Left            =   60
  255.       Picture         =   "form1.frx":0442
  256.       Top             =   -120
  257.       Width           =   780
  258.    End
  259. Attribute VB_Name = "Form1"
  260. Attribute VB_GlobalNameSpace = False
  261. Attribute VB_Creatable = False
  262. Attribute VB_PredeclaredId = True
  263. Attribute VB_Exposed = False
  264. Private MouseMsgFound As Integer
  265. Private Sub CmdExit_Click()
  266. MouseBlast1.RemoveFilter ' Removes the User Defined Filter
  267. Unload Form1
  268. End Sub
  269. Private Sub Form_DblClick()
  270. lblMsgFound.Caption = "Double Clicked"
  271. End Sub
  272. Private Sub Form_Load()
  273. MouseBlast1.DblClickSpeed = 510 ' Set Double Click Speed to 510 ms (500ms Normal)
  274. MouseBlast1.Caption = "MouseBlst1" ' Mouse Blaster Control Caption
  275. MouseBlast1.MsgAction = MsgRemove ' Mouse Blaster Action (Remove Message from Window Queue)
  276. MouseBlast1.WinHwnd = hWnd 'Destination Window to Install Message Filter (Handle)Form1.hwnd
  277. MouseBlast1.WinMsgTrap = WM_RBUTTONDOWN ' Queue Message to Filter
  278. ' Update Captions for User Inetrface
  279. lblDblClick.Caption = MouseBlast1.DblClickSpeed
  280. lblFilter.Caption = MouseBlast1.WinMsgTrap
  281. lblMsgFound.Caption = MouseBlast1.MsgFound: MouseMsgFound = MouseBlast1.MsgFound
  282. lblWhwnd.Caption = MouseBlast1.WinHwnd
  283. lblAction.Caption = MouseBlast1.MsgAction
  284. ' Update User Interface lblMsgActCap Label
  285. If MouseBlast1.MsgAction = MsgRemove Then
  286. lblMsgActCap.Caption = "Remove Message"
  287. ElseIf MouseBlast1.MsgAction = MsgNoRemove Then
  288. lblMsgActCap.Caption = "NO Remove Message"
  289. End If
  290. lblHwndHex.Caption = Hex(MouseBlast1.WinHwnd)
  291. MouseBlast1.FilterMsg ' Install the Defined Message Filter
  292. lblMsgFound.Caption = MouseMsgFound ' Is 0 when no messages filtered (1= Message Filtered)
  293.                                     ' Resets to 0 after a each check is made .
  294. End Sub
  295. Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  296. lblMsgFound.Caption = "Mouse Down"
  297. If Button = 1 Then ' Left Mouse Button was pressed
  298. 'MsgBox "Left Mouse Button Down", vbOKOnly, "Mouse Event Message"
  299. lblMsgFound.Caption = "Left Mouse Down"
  300. End If
  301. If Button = 2 Then ' Right Mouse Button Pressed
  302. 'MsgBox "Right Mouse Button Down", vbOKOnly, "Mouse Event Message"
  303. lblMsgFound.Caption = "Right Mouse Down"
  304. End If
  305. End Sub
  306. Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  307. lblMsgFound.Caption = "Mouse Moved"
  308. MouseMsgFound = MouseBlast1.MsgFound ' 0 when no messages filtered (1= Message Filtered)
  309.                                      ' Resets to 0 after the value loads into MouseMsgFound.
  310. lblMsgFilVal.Caption = MouseBlast1.WinMsgTrap ' Display Filtered Message Long Value
  311. If Button = 1 Then ' Left Mouse Button was pressed
  312. 'MsgBox "Left Mouse Move", vbOKOnly, "Mouse Event Message"
  313. lblMsgFound.Caption = "Left Mouse Move"
  314. End If
  315. If Button = 2 Then ' Right Mouse Button Pressed
  316. 'MsgBox "Right Mouse Move", vbOKOnly, "Mouse Event Message"
  317. lblMsgFound.Caption = "Right Mouse Move"
  318. End If
  319. ' Check Filter MsgFound status "Check for user specified filterd message"
  320. If MouseBlast1.WinMsgTrap = WM_RBUTTONDOWN And MouseMsgFound = 1 Then
  321. lblFilter.Caption = "WM_RBUTTONDOWN"
  322. MouseMsgFound = 0 ' Clears the holding Variable
  323. ElseIf MouseBlast1.WinMsgTrap = WM_LBUTTONDOWN And MouseMsgFound = 1 Then
  324. lblFilter.Caption = "WM_LBUTTONDOWN"
  325. MouseMsgFound = 0
  326. ElseIf MouseBlast1.WinMsgTrap = WM_MOUSEMOVE And MouseMsgFound = 1 Then
  327. lblFilter.Caption = "WM_MOUSEMOVE"
  328. MouseMsgFound = 0
  329. ElseIf MouseBlast1.WinMsgTrap = WM_RBUTTONUP And MouseMsgFound = 1 Then
  330. lblFilter.Caption = "WM_RBUTTONUP"
  331. MouseMsgFound = 0
  332. ElseIf MouseBlast1.WinMsgTrap = WM_LBUTTONUP And MouseMsgFound = 1 Then
  333. lblFilter.Caption = "WM_LBUTTONUP"
  334. MouseMsgFound = 0
  335. ElseIf MouseBlast1.WinMsgTrap = WM_LBUTTONDBLCLK And MouseMsgFound = 1 Then
  336. lblFilter.Caption = "WM_LBUTTONDBLCLK"
  337. MouseMsgFound = 0
  338. ElseIf MouseBlast1.WinMsgTrap = WM_RBUTTONDBLCLK And MouseMsgFound = 1 Then
  339. lblFilter.Caption = "WM_RBUTTONDBLCLK"
  340. MouseMsgFound = 0
  341. End If
  342. End Sub
  343. Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  344. ' Update User Capton Msg Found
  345. lblMsgFound.Caption = "Mouse Up"
  346. If Button = 1 Then ' Left Mouse Button was pressed
  347. 'MsgBox "Left Mouse Button Up", vbOKOnly, "Mouse Event Message"
  348. lblMsgFound.Caption = "Left Mouse Up"
  349. End If
  350. If Button = 2 Then ' Right Mouse Button Pressed
  351. 'MsgBox "Right Mouse Button Up", vbOKOnly, "Mouse Event Message"
  352. lblMsgFound.Caption = "Right Mouse Up"
  353. End If
  354. End Sub
  355.